package com.roc.steelend.util;


import com.roc.steelend.controller.vo.account.AccountSpecialKaipingOrderIdDetail;
import com.roc.steelend.controller.vo.account.AccountSpecialSaleOrderIdDetail;

import java.util.Comparator;

public class KaipingOrderByAccountComparator implements Comparator<AccountSpecialKaipingOrderIdDetail> {
    @Override
    public int compare(AccountSpecialKaipingOrderIdDetail o1, AccountSpecialKaipingOrderIdDetail o2) {
                if (o1.getProcessingTime().before(o2.getProcessingTime())){
            return -1;
        }else if (o1.getProcessingTime()==o2.getProcessingTime()){
            return 0;
        }else {
            return 1;
        }

    }
//    @Override
//    public int compare(AccountSpecialSaleOrderIdDetail o1, AccountSpecialSaleOrderIdDetail o2) {
//        if (o1.getOutStorageDate().before(o2.getOutStorageDate())){
//            return -1;
//        }else if (o1.getOutStorageDate()==o2.getOutStorageDate()){
//            return 0;
//        }else {
//            return 1;
//        }
//    }

}
